-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Precomputing tier odds #35
Conversation
|
||
} | ||
SD59x18 internal immutable TIER_ODDS_0_3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tier odds will always be less than 0 <= 1, so you can use the 64-bit SD1x18.
This should save gas
src/PrizePool.sol
Outdated
revert InvalidTier(_tier, _numberOfTiers); | ||
} | ||
|
||
tierOdds = TieredLiquidityDistributor._tierOdds(_tier, numberOfTiers); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this written so strangely with the Superclass qualifier?
src/PrizePool.sol
Outdated
startTimestamp = uint64( | ||
endTimestamp - | ||
TierCalculationLib.estimatePrizeFrequencyInDraws( | ||
TieredLiquidityDistributor._tierOdds(_tier, numberOfTiers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funny syntax? isn't it just an internal fxn?
bd3499a
to
8892ac2
Compare
No description provided.